How to encode a fixed-width text (code) block in forum?

How do you format a fixed-width code block in this forum?  In the old forum, I recall just surrounding the code fragment with {code} code {code} (or something like that).

Here, when I'm editing everything looks perfect but when I save the format changes from (for example) from Courier New to something else.

If I select formatted,  all the code gets compressed to one long line.

Normal with Courier New font override:


void 
helloWorld
() 
{
 
   
print
(
"I want a fixed font!\n"
)
;

}

 

FORMATTED:



void 
helloWorld() 
{
    
print(
"I want a fixed font!\n");

}

 


Fu Lin Yiu - Tue Nov 26 16:47:00 EST 2013

Re: How to encode a fixed-width text (code) block in forum?
llandale - Thu Dec 05 12:42:32 EST 2013

No formatting

Begining of BlockQuote  Font is "Arial"

Middle of BlockQuote.  Font is "Courier New".

end of BlockQuote

Type the line.  Select the entire line.  Change the "Font" settings.

-Louie

Re: How to encode a fixed-width text (code) block in forum?
Fu Lin Yiu - Thu Dec 05 13:02:28 EST 2013

llandale - Thu Dec 05 12:42:32 EST 2013

No formatting

Begining of BlockQuote  Font is "Arial"

Middle of BlockQuote.  Font is "Courier New".

end of BlockQuote

Type the line.  Select the entire line.  Change the "Font" settings.

-Louie

Lets see if I can follow the magic footprints ...

<p> In BlockQuote with Normal, Arial </p>

<p with Courier New>
void helloWorld() {
     print("I want a fixed font!\n");

}
</p with Courier New>

 

<p> Still In BlockQuote with Normal, Arial </p>

 

REMARK: A forum used primarily for pasting code-fragments should make this operation a bit easier.

Re: How to encode a fixed-width text (code) block in forum?
Fu Lin Yiu - Thu Dec 05 13:23:50 EST 2013

Fu Lin Yiu - Thu Dec 05 13:02:28 EST 2013

Lets see if I can follow the magic footprints ...

<p> In BlockQuote with Normal, Arial </p>

<p with Courier New>
void helloWorld() {
     print("I want a fixed font!\n");

}
</p with Courier New>

 

<p> Still In BlockQuote with Normal, Arial </p>

 

REMARK: A forum used primarily for pasting code-fragments should make this operation a bit easier.

I just noticed the <> icon to the left of paragraph selector and font selector.  I hit it and within I chose option DOORS and pasted my code.

void helloWorld() {
    print("I want a fixed font!\n");
}

After saving here I am.  I guess this works. 

WYSIWYG ... not -- what you see while editing is sure not what you get when you post